/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import models.PostBO;

/**
 *
 * @author BAOLA
 */
public class RejectPostAction {

    private String id;
    private String returnUrl;

    public RejectPostAction() {
    }

    public String execute() {

        try {
            int PostId = Integer.parseInt(getId());
            PostBO.rejectPost(PostId);
        } catch (Exception e) {
            return "fail";
        }
        return "success";

    }

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    public String getReturnUrl() {
        return returnUrl;
    }

    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }

    
}
